﻿using BepInEx;
using System;
using UnityEngine;
using HarmonyLib;
using UnityEngine.UI;
using System.Reflection;
using System.Threading;
using BepInEx.Configuration;

namespace tiandiguixu.foring
{
    [BepInPlugin("tiandiguixu.foring", "风铃辅助Mod", "1.0.2")]
    public partial class ForingMod : BaseUnityPlugin
    {
        protected static ForingMod instance;

        private static float GongDe = 0f;
        private static bool confirm = false;
        private static SacrificePanel sacrificePanel;
        private static Chara chara;

        private static bool refreshSacrifice=false;  


        void Start()
        {
            Logger.LogInfo("风铃Mod");
            instance = this; 

            Harmony.CreateAndPatchAll(typeof(ForingMod));
        }


        void Update()
        {
            if (Input.GetKeyDown(KeyCode.UpArrow) && GlobalController.Instance.IsInMainScene && WholeObjects.Instance!=null && WholeObjects.Instance.GetPlayerSect()!=null  )
            {
                WholeObjects.Instance.GetPlayerSect().gongDe += 100;
            }else if (Input.GetKeyDown(KeyCode.Home) && GlobalController.Instance.IsInMainScene)
            {
                refreshSacrifice = !refreshSacrifice;
                if (refreshSacrifice)
                {
                    Warning.Instance.SetWarning("开启祭祀刷新");
                }
                else
                {
                    Warning.Instance.SetWarning("关闭祭祀刷新");
                }
            }


        }
         
    }
}
